package net.esj.basic.core.engine.tools.crypt;

import java.security.KeyPair;
import java.security.PrivateKey;
import java.security.PublicKey;

/**
 * 非对称加密
 * @author Administrator
 *
 */
public interface AsymCrypt extends Crypt {

	public static final int ASYMMETRIC_KEY_ENCRYPR_TYPE_PUBLIC = 1;//以公钥加密
	public static final int ASYMMETRIC_KEY_ENCRYPR_TYPE_PRIVATE = 2;//以私钥加密
	
	KeyPair generateKeyPair(byte[] keyInfo);
	
	PublicKey getPublicKey(byte[] keyInfo);
	
	PrivateKey getPrivateKey(byte[] keyInfo);
	
	void setEncryptType(int type);
}
